package com.googlecode.jsimplemarket.wicket.components.grid;

import com.googlecode.jsimplemarket.repository.GenericOrder;
import com.googlecode.jsimplemarket.repository.GenericRestriction;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;

/**
 *
 * @author alex
 */
public interface GridAction<T extends Serializable> extends Serializable {
    int DEFAULT_PAGE_SIZE = 10;
    Iterator<T> getList(Class<T> persistentClass, List<GenericRestriction> genericProperties, List<GenericOrder> genericOrders, SortParam sort, long firstResult, long maxResults);    
    long getCount(Class<T> persistentClass, List<GenericRestriction> genericProperties);
    T load(Class<T> persistentClass, T entitate);
}
